<link rel="import" href="head.html?__inline">
<div class="head">
    <div class="container clearfix">
        <img src="images/logo.png" alt=""/><span>河北省安全科技技术中心在线培训系统</span>
        <ul>
            <li><a href="/index.html">首页</a></li>
            <li><a href="/training-plan.html">培训计划</a></li>
            <li><a href="/complete-plan.html">个人中心</a></li>
            <li><a href="/teacher-resources.html">师资管理</a></li>
            <li><a href="/novice-help.html"  class="active">帮助中心</a></li>
        </ul>
    </div>
</div>
    <!--head---end-->
    <div class="content">
        <div class="container">
            <div class="first-line"><span>通知公告</span></div>
            <div class="new-active clearfix">
                <div class="notice-help"><a href="#" class="no-h-active no-h-ac">新手帮助</a><a href="#">产品服务</a><a href="#">常见问题</a></div>
                <div class="not-help-div">
                <ul ms-controller="noticesByType">
                <li ms-for="el in @data.rows"><img src="images/classify.png" alt=""><a href="#" class="bgc" target="_blank"><a href="" ms-html="el.content"></a></a><span>这里是结束时间吗？{{@strTime(el.endTime)}}</span></li>
                 <!--<li><img src="images/classify.png" alt=""><a href="" class="bgc">最新安全法由人大常委会拟定,今天发布。</a><span>2016-08-03</span></li>
                 <li><img src="images/classify.png" alt=""><a href="" class="bgc">最新安全法由人大常委会拟定,今天发布。</a><span>2016-08-03</span></li>
                <li class="notification"><img src="images/classify.png" alt=""><a href="" class="bgc">最新安全法由人大常委会拟定,今天发布。</a><span>2016-08-03</span></li>-->
                    <div class="next-page clearfix">
                        <ul class="clearfix">
                            <li><a href="">首页</a></li>
                            <li><a href="">上一页</a></li>
                            <li><a href="" class="one">1</a></li>
                            <li><a href="">2</a></li>
                            <li><a href="">3</a></li>
                            <li><a href="">4</a></li>
                            <li><a href="">5</a></li>
                            <li><a href="">下一页</a></li>
                            <li><a href="">末页</a></li>
                        </ul>
                    </div>
                </ul>
                    <ul class="nov-help-u" ms-controller="noticesByType2">
                        <li ms-for="el in @data.rows"><img src="images/classify.png" alt=""><a href="#" class="bgc" target="_blank" ms-html="el.content"></a><span>{{@strTime(el.endTime)}}</span></li>
                     <!--   <li><img src="images/classify.png" alt=""><a href="" class="bgc">最啥安全法由人大常委会拟定,今天发布。</a><span>2016-08-03</span></li>
                        <li><img src="images/classify.png" alt=""><a href="" class="bgc">最啥安全法由人大常委会拟定,今天发布。</a><span>2016-08-03</span></li>
                        <li class="notification"><img src="images/classify.png" alt=""><a href="" class="bgc">最啥安全法由人大常委会拟定,今天发布。</a><span>2016-08-03</span></li>-->
                        <div class="next-page clearfix">
                            <ul class="clearfix">
                                <li><a href="">首页</a></li>
                                <li><a href="">上一页</a></li>
                                <li><a href="" class="one">1</a></li>
                                <li><a href="">2</a></li>
                                <li><a href="">3</a></li>
                                <li><a href="">4</a></li>
                                <li><a href="">5</a></li>
                                <li><a href="">下一页</a></li>
                                <li><a href="">末页</a></li>
                            </ul>
                        </div>
                    </ul>
                    <ul class="nov-help-u" ms-controller="noticesByType3">
                        <li ms-for="el in @data.rows"><img src="images/classify.png" alt=""><a href="#" class="bgc" target="_blank" ms-html="el.content"></a><span>{{@strTime(el.endTime)}}</span></li>
                        <div class="next-page clearfix">
                            <ul class="clearfix">
                                <li><a href="">首页</a></li>
                                <li><a href="">上一页</a></li>
                                <li><a href="" class="one">1</a></li>
                                <li><a href="">2</a></li>
                                <li><a href="">3</a></li>
                                <li><a href="">4</a></li>
                                <li><a href="">5</a></li>
                                <li><a href="">下一页</a></li>
                                <li><a href="">末页</a></li>
                            </ul>
                        </div>
                    </ul>
                </div>
            </div>

        </div>
    </div>
    <!--content---end-->
<link rel="import" href="footer.html?__inline">
<script>
    $(function(){
        var $div_li =$("div.notice-help > a");
        $div_li.click(function(){
            $(this).addClass("no-h-active")            //当前<li>元素高亮
                    .siblings().removeClass("no-h-active");  //去掉其它同辈<li>元素的高亮
            var index =  $div_li.index(this);  // 获取当前点击的<li>元素 在 全部li元素中的索引。
            $("div.not-help-div > ul")      //选取子节点。不选取子节点的话，会引起错误。如果里面还有div
                    .eq(index).show()   //显示 <li>元素对应的<div>元素
                    .siblings().hide(); //隐藏其它几个同辈的<div>元素
        }).hover(function(){
            $(this).addClass("hover");
        },function(){
            $(this).removeClass("hover");
        })
    });
    var indexVm1 = avalon.define({
        $id: "noticesByType",
        data: [],
        strTime: function (time) {
            return dataStr(time);
        }
    });
    function getNoticeData() {
        var param = {
            pageCurrent: 1,
            pageSize: 10,
            noticeType: 'help'
        };

        post("home/notice/getNoticesByType.do", param, function (data) {
            console.log(data);
            indexVm1.data = data;
        }, function (msg) {
            console.log(msg);
        });
    }
    getNoticeData();

    var indexVm2 = avalon.define({
        $id: "noticesByType2",
        data: [],
        strTime: function (time) {
            return dataStr(time);
        }
    });
    function getNoticeData2() {
        var param = {
            pageCurrent: 1,
            pageSize: 10,
            noticeType: 'server'
        };

        post("home/notice/getNoticesByType.do", param, function (data) {
            console.log(data);
            indexVm2.data = data;
        }, function (msg) {
            console.log(msg);
        });
    }
    getNoticeData2();

    var indexVm3 = avalon.define({
        $id: "noticesByType3",
        data: [],
        strTime: function (time) {
            return dataStr(time);
        }
    });
    function getNoticeData3() {
        var param = {
            pageCurrent: 1,
            pageSize: 10,
            noticeType: 'question'
        };

        post("home/notice/getNoticesByType.do", param, function (data) {
            console.log(data);
            indexVm3.data = data;
        }, function (msg) {
            console.log(msg);
        });
    }
    getNoticeData3();

</script>
</body>
</html>